<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateReviewLogTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('review_log', function (Blueprint $table) {
            $table->bigInteger('id', true);
            $table->string('comment', 4500)->default('')->comment('Comment');
            $table->bigInteger('reviewer_id')->nullable()->comment('审核人员uid。');
            $table->string('review_name', 45)->nullable()->comment('审核人名称');
            $table->string('log_type', 45)->nullable()->comment('日志记录');
            $table->bigInteger('form_instance_id')->nullable();
            $table->dateTime('create_time')->nullable()->useCurrent();
            $table->bigInteger('creator_id')->nullable()->default(0);
            $table->dateTime('update_time')->nullable()->useCurrent();
            $table->bigInteger('updater_id')->nullable()->default(0);
            $table->integer('deleted')->default(0);
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('review_log');
    }
};
